test(coverage): targeted unit tests for Issue #25 coverage gate#28
Merged
levleontiev merged 2 commits intomainfrom Mar 14, 2026
Merged
test(coverage): targeted unit tests for Issue #25 coverage gate#28levleontiev merged 2 commits intomainfrom
levleontiev merged 2 commits intomainfrom
Conversation
Add new test cases for previously uncovered branches in utils.lua, streaming.lua, and bundle_loader.lua to push non-generated coverage above the 82.28% baseline: - utils: now() no-ngx, safe_require, to_hex, constant_time_equals, encode_base64 no-ngx, decode_base64 fallback, base64url_decode edge cases, sha256 nil guard, json additional branches, get_json chain - streaming: validate_config type errors, is_streaming nil/non-table, body_filter truncated/buffer paths, include_partial_usage=false - bundle_loader: ua descriptor hint, sha1-fallback HMAC, hmac unavailable, md5/pure hash fallbacks, no-timer init, file_not_found, saas_client audit event on apply Closes #25 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
luacheck warned: variable utils re-defined on line 260, already declared on line 3. Remove the redundant require at the Issue #25 section header. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
utils_spec.lua,streaming_spec.lua,bundle_loader_spec.lua, andbundle_loader.featureto cover previously uncovered branchesnow()no-ngx,safe_require,to_hex,constant_time_equalsall branches,encode_base64no-ngx,decode_base64fallback,base64url_decodeedge cases,sha256nil guard, json escape sequences and error branches,get_jsonchainvalidate_configtype error branches,is_streamingnil/non-table input,body_filtertruncated/buffer flush paths,include_partial_usage=falseomits usage fragmentinit_hot_reloadwithout ngx.timer,load_from_filefile_not_found, saas_clientbundle_activatedaudit event on applyTest plan
busted spec/unit/)Closes #25
🤖 Generated with Claude Code